package com.sevenmall.productservice.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 分类表
 * </p>
 *
 * @author Yesi
 * @since 2020-08-24
 */
@TableName("sevenmall_category")
public class Category extends Model<Category> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 分类名称
     */
    private String name;

    /**
     * 分类简介
     */
    private String description;

    /**
     * 分类上级ID
     */
    private Integer parent_id;

    /**
     * 分类级别
     */
    private Integer level;

    /**
     * 分类关键字,采用逗号间隔
     */
    private String keywords;

    /**
     * 分类图片
     */
    private String pic_url;

    /**
     * 分类图标
     */
    private String icon_url;

    /**
     * 分类的商品数量
     */
    private Integer product_count;

    /**
     * 创建时间
     */
    private LocalDateTime add_time;

    /**
     * 更新时间
     */
    private LocalDateTime update_time;

    /**
     * 逻辑删除
     */
    private Boolean deleted;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public Integer getParent_id() {
        return parent_id;
    }

    public void setParent_id(Integer parent_id) {
        this.parent_id = parent_id;
    }
    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }
    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }
    public String getPic_url() {
        return pic_url;
    }

    public void setPic_url(String pic_url) {
        this.pic_url = pic_url;
    }
    public String getIcon_url() {
        return icon_url;
    }

    public void setIcon_url(String icon_url) {
        this.icon_url = icon_url;
    }
    public Integer getProduct_count() {
        return product_count;
    }

    public void setProduct_count(Integer product_count) {
        this.product_count = product_count;
    }
    public LocalDateTime getAdd_time() {
        return add_time;
    }

    public void setAdd_time(LocalDateTime add_time) {
        this.add_time = add_time;
    }
    public LocalDateTime getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(LocalDateTime update_time) {
        this.update_time = update_time;
    }
    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Category{" +
            "id=" + id +
            ", name=" + name +
            ", description=" + description +
            ", parent_id=" + parent_id +
            ", level=" + level +
            ", keywords=" + keywords +
            ", pic_url=" + pic_url +
            ", icon_url=" + icon_url +
            ", product_count=" + product_count +
            ", add_time=" + add_time +
            ", update_time=" + update_time +
            ", deleted=" + deleted +
        "}";
    }
}
